<?php
	define('SEPARATOR', '/');
	define('BASE_ABS',	'');
	define('VIEW_ABS',	'views');
	define('APPS_ABS',  'apps');
	define('VIEW_EXT',	'.html');
	define('APPS_EXT',	'.php');

	require("common.php");
	$RTR			= new Router ($_SERVER['REDIRECT_URL'], 'backend');
	$template		= VIEW_ABS . $RTR->views;
	$control		= APPS_ABS . $RTR->apps;
	$params			= $RTR->args;
	list($module, $action, ) = $RTR->segments;

	if(!file_exists($template) && !file_exists($control)){exit;}

	require('init_top.php');
	if (file_exists($template)) $tp = new template($template);
	if (file_exists($control)) require($control);
	
	//require('init_bottom.php');
	if (file_exists($template)) $tp->Display();
?>